Skip to content

Conversation

@maythamfahmi
Copy link
Collaborator

Related to #154

This pull request introduces several improvements across the solution, focusing on package versioning, build metadata, dependency updates, and DevOps automation. The main changes enhance package reproducibility, repository metadata, and ensure up-to-date dependencies for better compatibility and maintainability.

Build and Packaging Enhancements:

  • Added build and repository metadata properties (IsPackable, RepositoryUrl, PublishRepositoryUrl, DebugType, Deterministic, ContinuousIntegrationBuild, EmbedUntrackedSources) to CryptoNet.Models.csproj and CryptoNet.ExtShared.csproj to improve package reproducibility and traceability. [1] [2]
  • Updated CryptoNet/CryptoNet.csproj to embed debug symbols, include referenced projects, and ensure referenced DLLs (CryptoNet.ExtShared, CryptoNet.Models) are packed into the NuGet package. [1] [2]
  • Introduced Directory.Build.Props to centralize and conditionally set common properties such as versioning and PathMap.

Dependency and Version Updates:

  • Updated System.Text.Json and several other dependencies to their latest versions across main projects, examples, and test projects for improved compatibility and security. [1] [2] [3] [4] [5] [6] [7]
  • Updated the CryptoNet package version in CryptoNet.ConsumerTest to a preview release, aligning with the new versioning scheme.

DevOps and Workflow Improvements:

  • Refined the tag pattern in .github/workflows/cd-release-preview.yml and run_release.ps1 to ensure NuGet-compliant preview versioning (e.g., vX.Y.Z-previewYYYYMMDDHHmm). [1] [2]
  • Added run_nuget_validation.ps1 script for validating NuGet packages locally.
  • Updated the solution file (CryptoNet.sln) to Visual Studio 18 and included new utility files for DevOps. [1] [2]

Other Notable Changes:

  • Removed explicit <Version> tags from project files in favor of centralized versioning. [1] [2]

These changes collectively modernize the build, packaging, and release process, streamline dependency management, and improve traceability for the CryptoNet solution.

- Set `<IsPackable>false</IsPackable>` in `CryptoNet.ExtShared.csproj`
  and `CryptoNet.Models.csproj` to prevent NuGet packaging.
- Bump version in `CryptoNet.csproj` from `3.0.0` to `3.1.9`.
- Add `<IncludeReferencedProjects>true</IncludeReferencedProjects>`
  to include referenced project outputs in the NuGet package.
- Add a target to explicitly include referenced DLLs in the package.
- Modify asset handling for `CryptoNetLogo-icon.png` to prevent
  copying to the output directory.
- Update `Directory.Build.Props` to conditionally set `<PathMap>`
  only when `$(SolutionDir)` is defined, avoiding malformed paths.
- Upgraded `Microsoft.CodeAnalysis.NetAnalyzers` to `10.0.100`.
- Upgraded `System.Text.Json` to `10.0.0` across all projects.
- Updated test dependencies: `Microsoft.NET.Test.Sdk`, `NUnit3TestAdapter`,
  `ReportGenerator`, `SharperHacks.CoreLibs.IO`, `CliWrap`, and `NUnit.Analyzers`.
- Added `Microsoft.Build` to `CryptoNet.UnitTests.csproj`.
- Enabled embedded debugging with `<DebugType>embedded</DebugType>`.
- Re-enabled `<GenerateDocumentationFile>` in `CryptoNet.csproj`.
- Centralized versioning in `Directory.Build.Props` and set version to `3.2.0`.
- Updated `TargetFramework` to `net8.0` in `Directory.Build.Props`.
- Adjusted project references and metadata for consistency.
- Set `<IsPackable>false</IsPackable>` in `CryptoNet.ExtShared.csproj`
  and `CryptoNet.Models.csproj` to prevent standalone NuGet packing.
- Added `<DebugType>portable</DebugType>` and `<Deterministic>true</Deterministic>`
  for portable PDBs and deterministic builds.
- Downgraded `Microsoft.CodeAnalysis.NetAnalyzers` to 9.0.0 and
  `System.Text.Json` to 9.0.8 in `CryptoNet.ExtShared.csproj` for compatibility.
- Included `.pdb` and `.xml` files for `CryptoNet.ExtShared` and
  `CryptoNet.Models` in the NuGet package if they exist.
- Added NuGet validation script in `run_nuget_validation.ps1` to
  ensure package quality using `dotnet-validate`.
Updated project files to improve NuGet packaging and SourceLink integration:
- Added `<IsPackable>false</IsPackable>` to prevent standalone NuGet packaging.
- Included repository metadata (`<RepositoryUrl>` and `<PublishRepositoryUrl>`).
- Enabled SourceLink and deterministic build settings with `<EmbedUntrackedSources>` and `<ContinuousIntegrationBuild>`.

Refined dependencies:
- Added `Microsoft.SourceLink.GitHub` (v8.0.0) for GitHub SourceLink support.
- Retained `Microsoft.CodeAnalysis.NetAnalyzers` (v9.0.0) for static analysis.

Removed obsolete properties and comments:
- Removed `_SkipUpgradeNetAnalyzersNuGetWarning` and outdated comments.

Updated `run_nuget_validation.ps1`:
- Added `dotnet clean`, `dotnet build`, and `dotnet pack` commands.
- Integrated `dotnet-validate` for NuGet package validation.
Removed `<DebugType>portable>`, `<Deterministic>`,
`<ContinuousIntegrationBuild>`, and `<EmbedUntrackedSources>`
from `CryptoNet.ExtShared.csproj` and `CryptoNet.Models.csproj`.
These changes simplify the build configuration by removing
explicit settings for debug information, deterministic builds,
CI build flags, and SourceLink validation. Adjustments may
reflect a shift to default or external configurations.
- Updated `CryptoNet.ConsumerTest.csproj` to use `CryptoNet` version `3.1.12-preview.20251129.2241`.
- Removed the `<Version>` tag from `CryptoNet.ExtPack.csproj` (was `3.0.0`).
- Upgraded Visual Studio version in `CryptoNet.sln` to `18.3.11222.16`.
- Added `Directory.Build.Props` with updated versioning:
  - `<Version>`: `3.2.0` → `3.2.5`
  - `<FileVersion>`: `3.2.0.0` → `3.2.5.0`
  - `<AssemblyVersion>`: `3.2.0.0` → `3.2.5.0`
- Updated target framework in `Directory.Build.Props` to `net8.0`.
Updated `cd-release-preview.yml` to simplify the regex for preview tag matching. Adjusted `run_release.ps1` to make `PreviewId` and `TagName` NuGet-compliant by removing dots and using the format `vX.Y.Z-previewYYYYMMDDHHmm`. Improved error messaging for version validation. Added `run_release.ps1` to the `DevOps` project in `CryptoNet.sln`.
@maythamfahmi maythamfahmi self-assigned this Nov 30, 2025
@maythamfahmi maythamfahmi added bug Something isn't working version3.4.3 labels Nov 30, 2025
@maythamfahmi maythamfahmi merged commit 130afb2 into main Nov 30, 2025
7 of 9 checks passed
@maythamfahmi maythamfahmi deleted the feature/hotfix-fixing-release-and-package-issues branch November 30, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working version3.4.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants